using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace WebOS.Core.Security.Models.Mapping
{
	public class FunctionMap : EntityTypeConfiguration<Function>
	{
		public FunctionMap()
		{
			// Primary Key
			this.HasKey(t => t.FunId);

			// Properties
			this.Property(t => t.FunCode)
				.HasMaxLength(255);
				
			this.Property(t => t.FunName)
				.HasMaxLength(255);
				
			// Table & Column Mappings
			this.ToTable("Function");
			this.Property(t => t.FunId).HasColumnName("FunId");
			this.Property(t => t.FunCode).HasColumnName("FunCode");
			this.Property(t => t.FunName).HasColumnName("FunName");
		}
	}
}

